package exercisesI;

import java.util.Scanner;

public class Exercise2 {

	/**
	 * @author - Rafael Medina
	 * See if an integer is divisible by another one.
	 */
	
	public static void main(String[] args) {
		
		// Declare the integer variables
		int a, b;
		
		// Declare the scanner object used to give values to a and b
		Scanner sc = new Scanner(System.in);
		
		// Ask the user to enter values
		System.out.print("Please enter a value for a: ");
		a = sc.nextInt();
		System.out.print("Please enter a value for b: ");
		b = sc.nextInt();
		
		// Now check if a is divisible by b
		// Although this can be done in several ways, I'll do it by checking if the remainder of the division is 0
		if (a % b != 0) {
			System.out.print("a is not divisible by b, sorry");
		} else {
			System.out.print("a is divisible by b");
		}

	}

}
